<!DOCTYPE html>
<html style="background-attachment: fixed;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta http-equiv="Cache-Control" content="no-transform">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>XGD日志管理后台</title>
    <meta name="description" itemprop="description" content="新国都日志管理后台">
    <meta name="keywords" content="新国都,日志,管理,后台">
    <meta name="generator" content="皮皮华">
    <meta name="author" content="皮皮华">
    <meta name="copyright" content="huazai.eleuu.com">
    <link rel="shortcut icon" href="static/favicon.ico" type="image/x-icon">
    <link href="static/style/common.css?ver=4.40" rel="stylesheet">
    <link href="static/style/font-awesome/css/font-awesome.css?ver=4.40" rel="stylesheet">
    <link href="static/style/wap/app_explorer.css?ver=4.40" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>
    <style id="kodStyleDiy" type="text/css"></style>
    <style id="add-style-css-text" type="text/css">
        .music-player-dialog {
            visibility:hidden;
        }
        .pswp--supports-fs .pswp__button--fs {
            display:none !important;
        }
        .x-item-file.x-vue, .x-item-file.x-we, .x-item-file.x-wpy {
            background-image:url('http://admin.eleuu.com/plugins/toolsCommon/static/file_icon/vue.png');
        }
        .x-item-file.x-ofd {
            background-image:url('http://admin.eleuu.com/plugins/pdfjs/static/ofd/img/icon.png');
        }
        body .file .ico img.border-radius-none {
            border-radius:0;
            transition: all 0.2s ease;
            max-height: 90%;
            box-shadow: 3px 4px 12px 0 rgba(0, 0, 0, .2);
            background: #fff;
        }
        .x-item-file.x-ofd {
            background-image:url('http://admin.eleuu.com/plugins/ofdView/static/images/icon.png');
        }
        .x-item-file.x-eml {
            background-image:url('http://admin.eleuu.com/plugins/emlViewer/static/images/icon.png');
        }
        .x-item-file.x-mht, .x-item-file.x-mhtml {
            background-image:url('http://admin.eleuu.com/static/images/file_icon/icon_file/mht.png');
        }
    </style>
</head>

<body class="wap-page support-space-not">
<div class="frame-main">
    <div class="panel-mask"></div>
    <div class="frame-header">
        <div class="tool tool-menu-left">
            <div class="menu"><i class="font-icon icon-reorder"></i>

            </div>
        </div>
        <div class="menu-group fl tool tool-submenu">
            <button class="topbar-menu" id="topbar-submenu" data-toggle="dropdown">	<i class="icon-home"></i>

            </button>
            <ul class="dropdown-menu topbar-submenu pull-left animated menuShow" role="menu" aria-labelledby="topbar-submenu">
                <li><a class="topbar-menu-sub " href="index.php?desktop" target="_blank" draggable="false"><i class="font-icon menu-desktop"></i><span>桌面</span></a>

                </li>
                <li><a class="topbar-menu-sub this" href="index.php?explorer" target="_blank" draggable="false"><i class="font-icon menu-explorer"></i><span>文件管理</span></a>

                </li>
                <li><a class="topbar-menu-sub " href="index.php?editor" target="_blank" draggable="false"><i class="font-icon menu-editor"></i><span>编辑器</span></a>

                </li>
                <li><a class="topbar-menu-sub " href="../" target="_blank" draggable="false">首页</a>

                </li>
                <li><a class="topbar-menu-sub " href="http://admin.eleuu.com/index.php?pluginApp/to/adminer/" target="_blank" draggable="false"><i class="icon font-icon font-icon icon-bar-chart bg-blue-7"></i><span>Adminer</span></a>

                </li>
            </ul>
        </div>
        <div class="title">XGD日志管理后台</div>
        <div class="menu-group">
            <div class="btn-list-icon"><i class="font-icon icon-home"></i>

            </div>
        </div>
    </div>
    <div class="address" style="width: 100%; left: 0px;">
        <ul class="yarnball">
            <li class="yarnlet "><a title="" data-path="" style="z-index:9;"><span class="title-name"></span></a>

            </li>
        </ul>
        <div style="clear: both"></div>
    </div>
    <div class="bodymain">
        <div class="file-continer file-list-list">
        </div>
    </div>
    <iframe name="donwn_iframe" id="donwn_iframe" style="display:none;height: 0px;overflow: hidden;width: 0px;" src="" width="0" height="0"></iframe>
    <script>
        //全局文件名
        var actionFileName = "";
        //加载所有文件
        function GetFileList(){
            $.ajax({
                type: "GET",
                url: "/xgd",
                data: "action=get_log_info",
                dataType : "json",
                success: function(jsonData){
                    var newHtml = "";
                    var data;
                    var fileActionHtml='<div class="file-action-menu" name="file-action-menu" style="bottom: 0px;display:none;">'
                        +'<div class="donwnShowFileName" style="width: 100%;height: 30px;line-height: 30px;background-color: rgba(221, 153, 153, 0.31);border: 1px solid rgba(103, 17, 128, 0.24);"></div>'
                        +'    <div style="display:none;" class="action-menu" data-action="action-copy" onclick="ActionRename()"><span class="content"><i class="font-icon icon-copy"></i>复制</span></div>'
                        +'    <div style="display:none;" class="action-menu" data-action="action-cute" onclick="ActionRename()"><span class="content"><i class="font-icon icon-cut"></i>剪切</span></div>'
                        +'    <div style="display:none;" class="action-menu" data-action="action-share" onclick="ActionRename()"><span class="content"><i class="font-icon icon-share"></i>分享</span></div>'
                        +'    <div style="display:none;" class="action-menu" data-action="action-rename" onclick="ActionRename()"><span class="content"><i class="font-icon icon-pencil"></i>重命名</span></div>'
                        +'    <div style="action-menu;" class="action-menu" data-action="action-info" onclick="ActionInfo()"><span class="content"><i class="font-icon icon-info"></i>详情</span></div>'
                        +'    <div class="action-menu" data-action="action-download" onclick="ActionDownload()"><span class="content"><i class="font-icon icon-cloud-download"></i>下载</span></div>'
                        +'    <div style="display:none;" class="action-menu" data-action="action-download" onclick="ActionDownloadZip()"><span class="content"><i class="font-icon icon-cloud-download"></i>压缩下载</span></div>'
                        +'    <div class="action-menu" data-action="action-remove" onclick="ActionRemove()"><span class="content"><i class="font-icon icon-trash"></i>删除</span></div>'
                        +'    <div class="menu-close" data-action="action-close" onclick="ActionClose()"><span class="content" style="display: inline-block;width: 200px;text-align: left;margin-left: 120px;"><i class="font-icon icon-remove" style="width: 20px;"></i>&nbsp;&nbsp;&nbsp;关闭</span></div>'
                        +'<div style="clear:both"></div></div>';
                    for (var i = 0; i < jsonData.data.length; i++){
                        if(i===0){
                            $(".title-name").html(jsonData.data[i].path);
                        }
                        data = jsonData.data[i];
                        newHtml += '<div name="file'+(i+1)+'" data-path="" class="file undefinedfile-box menu-file file-not-writeable file2" title="大小:'+data.size+'修改时间:'+data.modTime+'" data-size="'+data.size+'">'
                            + '    <div class="ico" filetype="'+data.type+'">'
                            + '        <i class="x-item-file x-'+data.type+' small"></i>'
                            + '    </div>'
                            + '    <div class="filename">'
                            + '        <span class="title">'+data.name+'</span>'
                            + '    </div>'
                            + '    <div class="filesize">'+data.size+'</div>'
                            + '    <div class="filetime">'+data.modTime+'</div>'
                            + '    <div style="clear:both"></div>'
                            + '    <div class="file-action icon-font icon-ellipsis-horizontal"  onclick="FileClick(this,\''+data.id+'\')"></div>'
                            + '</div>';
                    }
                    newHtml +='<div style="clear:both"></div>'
                        + '<div class="flex-empty"></div>'
                        + '<div class="flex-empty"></div>'
                        + '<div class="flex-empty"></div>';

                    $(".file-continer").html(newHtml+fileActionHtml);
                }
            });
        }
        //点击文件
        function FileClick(action,name){
            $(".file-action-menu").toggle();
            actionFileName = name;
            $(".donwnShowFileName").html('<span class="content" name="" style="color: #d249c3;"><i class="font-icon icon-file" style="display: inline-block;width: 46px;margin-left: -50px;"></i>'+actionFileName+'.log</span>');
        }
        //下载文件
        function ActionDownload() {
            $("#donwn_iframe").attr("src","/xgd?action=get_log&sn="+actionFileName);
        }
        //下载压缩文件
        function ActionDownloadZip() {
            $("#donwn_iframe").attr("src","/xgd?action=get_log_zip&sn="+actionFileName);
        }
        //删除文件
        function ActionRemove() {
            $("#donwn_iframe").attr("src","/xgd?action=del_log&sn="+actionFileName);
            GetFileList();
        }
        //重命名
        function ActionRename() {

        }
        //属性
        function ActionInfo() {
            window.location.href="/xgd/info?sn="+actionFileName;
        }
        //关闭
        function ActionClose() {
            $(".file-action-menu").hide();
        }
        //加载页面完成
        $(document).ready(function() {
            GetFileList();
        });
    </script>
</div>
<div style="display: none; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; background: rgb(255, 255, 255) none repeat scroll 0% 0%;"></div>
</body>

</html>